package com.pureut.storage.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pureut.storage.domain.PickingPurchaseDetail;
import com.pureut.storage.dto.PickingPurchaseDetailListDto;
import com.pureut.storage.vo.PickingPurchaseDetailVo;
import com.sale.common.mybatis.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * TODO
 *
 * @Description  采购退货明细 Mapperr
 * @Author 18741
 * @Date 2023/8/8 13:39
 **/


@Mapper
public interface PickingPurchaseDetailMapper extends BaseMapperPlus<PickingPurchaseDetailMapper,PickingPurchaseDetail,PickingPurchaseDetail> {

    /**
     * 采购退货查询
     * @param pickingPurchaseDetailVo
     * @return
     */
    List<PickingPurchaseDetail> getPickingPurchaseDetailList(@Param("pickingPurchaseDetailVo") PickingPurchaseDetailVo pickingPurchaseDetailVo);

    /**
     * 查询采购退货明细列表
     * @param docNum
     * @return
     */
    Page<PickingPurchaseDetailListDto> getPurchaseList(@Param("page")Page<PickingPurchaseDetailListDto> page,@Param("docNum") String docNum);

    /**
     * 查询当前单号下批次的净重之和
     * @param inputValue
     * @param docNum
     * @return
     */
    Double getNetWeight(@Param("inputValue") String inputValue,@Param("docNum") String docNum);

    /**
     * 查询当前单据号下对应的净重之和
     * @param inputValue
     * @return
     */
    Double getDoc(String inputValue);

    Double getPici(@Param("inputValue") String inputValue,@Param("docNum") String docNum);

    /**
     * 获取采购退货单产品号码
     * @param id
     * @return
     */
    PickingPurchaseDetail getKw(Long id);
}
